<?php
/*
Plugin Name: Redis清除缓存
Plugin URI: https://6ns.net/post-994.html
Description: 使用管理用户清除Redis缓存,请先安装Redis缓存后使用本插件.码云地址:https://gitee.com/haebong/wordpress-redis-cache
Version: 1.0.2
Text Domain: Redis清除缓存
Author: Spectre
Author URI: https://6ns.net/blog
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/

/*  Copyright 2018  Spectre  (admin@6ns.net https://6ns.net)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

if (! defined ( 'ABSPATH' )) exit (); // Exit if accessed directly
if (! defined ( 'SP_REDIS_CACHE' )) define ( 'SP_REDIS_CACHE', 'SP_REDIS_CACHE' ); else return;
define('SP_REDIS_CACHE_FILE',__FILE__);
define('SP_REDIS_CACHE_DIR',rtrim(plugin_dir_path(SP_REDIS_CACHE_FILE),'/'));
include(SP_REDIS_CACHE_DIR.'/include/functions.php');
add_action('admin_menu', 'sp_redis_cache_menu',0,10);
//初始化
define('SP_REDIS_CACHE_VERSION','V1.0.2');
include(SP_REDIS_CACHE_DIR.'/include/install.php');
register_activation_hook(__FILE__, 'sp_redis_plugin_redirect');
register_deactivation_hook( __FILE__, 'sp_redis_plugin_activation' );
?>